package com.mego.weblink.database.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.mego.weblink.database.dbmodel.Lonlatlog;
import com.mego.weblink.database.dbmodel.Commandlog;
import com.mego.weblink.database.dbmodel.SystemAllInfo;

import com.mego.weblink.database.greendao.LonlatlogDao;
import com.mego.weblink.database.greendao.CommandlogDao;
import com.mego.weblink.database.greendao.SystemAllInfoDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig lonlatlogDaoConfig;
    private final DaoConfig commandlogDaoConfig;
    private final DaoConfig systemAllInfoDaoConfig;

    private final LonlatlogDao lonlatlogDao;
    private final CommandlogDao commandlogDao;
    private final SystemAllInfoDao systemAllInfoDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        lonlatlogDaoConfig = daoConfigMap.get(LonlatlogDao.class).clone();
        lonlatlogDaoConfig.initIdentityScope(type);

        commandlogDaoConfig = daoConfigMap.get(CommandlogDao.class).clone();
        commandlogDaoConfig.initIdentityScope(type);

        systemAllInfoDaoConfig = daoConfigMap.get(SystemAllInfoDao.class).clone();
        systemAllInfoDaoConfig.initIdentityScope(type);

        lonlatlogDao = new LonlatlogDao(lonlatlogDaoConfig, this);
        commandlogDao = new CommandlogDao(commandlogDaoConfig, this);
        systemAllInfoDao = new SystemAllInfoDao(systemAllInfoDaoConfig, this);

        registerDao(Lonlatlog.class, lonlatlogDao);
        registerDao(Commandlog.class, commandlogDao);
        registerDao(SystemAllInfo.class, systemAllInfoDao);
    }
    
    public void clear() {
        lonlatlogDaoConfig.clearIdentityScope();
        commandlogDaoConfig.clearIdentityScope();
        systemAllInfoDaoConfig.clearIdentityScope();
    }

    public LonlatlogDao getLonlatlogDao() {
        return lonlatlogDao;
    }

    public CommandlogDao getCommandlogDao() {
        return commandlogDao;
    }

    public SystemAllInfoDao getSystemAllInfoDao() {
        return systemAllInfoDao;
    }

}
